'use strict';
const ObjectId = require('mongodb').ObjectId;

module.exports = app => {
  const mongoose = app.mongoose;
  const Schema = mongoose.Schema;

  const socketsSchema = new Schema({
    userId: ObjectId,
    socketId: String,
  });

  return mongoose.model('sockets', socketsSchema, 'sockets');
};
